import Queue from '../useStack'
import Assert from '@/utils/assets'
export const test = () => {
    const q = new Queue()
    const assert = new Assert();
    console.log(q);

    assert.type('init size').expect(q.size()).toBe(0)
    assert.type('isEmpty').expect(q.isEmpty()).toBe(true)

    q.enQueue(1)
    q.enQueue(2)
    q.enQueue(3)
    q.enQueue(4)
    
    // assert.type('init size').expect(q.size()).toBe(4)
    // assert.type('isEmpty').expect(q.isEmpty()).toBe(false)
    console.log(q.deQueue())
    console.log(q.deQueue())
    console.log(q.deQueue())

    print(q)
}

const print = <T>(q: Queue<T>) => {
    let str = ''
    q.forEach((ele) => {
        str += `${ele} -> `
    })
    str = str.substring(0, str.length - 3)
    console.log(str)
}


